package com.rbac.admin.entity.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.rbac.admin.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

/**
 * 菜单实体类
 *
 * @author rbac-admin
 * @since 2024-07-18
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("sys_menu")
@Schema(description = "菜单实体")
public class SystemMenu extends BaseEntity {

    @Schema(description = "父级ID")
    @TableField("parent_id")
    private String parentId;

    @Schema(description = "菜单名称")
    @TableField("menu_name")
    private String name;

    @Schema(description = "菜单类型：1-目录，2-菜单，3-按钮")
    @TableField("menu_type")
    private String type;

    @Schema(description = "路由路径")
    @TableField("path")
    private String path;

    @Schema(description = "组件路径")
    @TableField("component")
    private String component;

    @Schema(description = "权限标识")
    @TableField("permission")
    private String permission;

    @Schema(description = "图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "排序")
    @TableField("sort_order")
    private Integer sort;

    /*
    @Schema(description = "是否外链：0-否，1-是")
    @TableField("is_frame")
    private Integer isFrame;

    @Schema(description = "是否缓存：0-否，1-是")
    @TableField("is_cache")
    private Integer isCache;
    */

    @Schema(description = "是否可见：0-否，1-是")
    @TableField("visible")
    private Integer visible;

    @Schema(description = "状态：0-禁用，1-正常")
    @TableField("status")
    private Integer status;

    /*
    @Schema(description = "备注")
    @TableField("remark")
    private String remark;
    */

    @TableField(exist = false)
    @Schema(description = "子菜单列表")
    private List<SystemMenu> children;
}